// 权限类型
export enum PermissionType {
  MENU = 1,    // 菜单
  BUTTON = 2,  // 按钮
  API = 3      // 接口
}

// 权限基础信息
export interface PermissionBase {
  permissionName: string
  permissionCode: string
  permissionType: PermissionType
  parentId: number
  path?: string
  component?: string
  icon?: string
  sort: number
  status: number
}

// 权限信息
export interface PermissionInfo {
  id: number
  parentId: number
  permissionName: string
  permissionCode: string
  permissionType: PermissionType
  path?: string
  component?: string
  icon?: string
  sort: number
  status: number
  children?: PermissionInfo[]
  createTime?: string
  updateTime?: string
  isDeleted?: boolean
  menuId?: number | null
}

// 权限查询参数
export interface PermissionQuery {
  permissionName?: string
  permissionCode?: string
  permissionType?: PermissionType
  status?: number
  current: number
  size: number
}

// 权限树节点
export interface PermissionTreeNode extends PermissionInfo {
  children?: PermissionTreeNode[]
}

// 菜单树节点
export interface MenuTreeNode {
  id: number
  menuName: string
  children?: MenuTreeNode[]
}

// 权限树查询参数
export interface PermissionTreeQuery {
  userId?: number
} 